package com.howso.cloud.changan.user.query.impl;

import com.howso.cloud.changan.user.query.ChanganUserQueryApplicationService;
import com.howso.cloud.changan.user.entity.ChanganUser;
import com.howso.cloud.changan.user.repository.ChanganUserRepository;
import com.howso.cloud.ddd.service.impl.BaseServiceImpl;
import com.howso.cloud.ddd.util.GenericTypeConverter;
import com.howso.cloud.oauth2.model.SysUser;
import org.springframework.stereotype.Service;

@Service
public class ChanganUserQueryApplicationServiceImpl extends BaseServiceImpl<ChanganUserRepository, SysUser, ChanganUser> implements ChanganUserQueryApplicationService {

    @Override
    public SysUser selectByUsername(String s) {
        return GenericTypeConverter.parseObject(repository.selectByUsername(s),SysUser.class);
    }
}
